import React from 'react';
import {connect} from 'react-redux';
import {Link} from 'dva/router';
import styles from './Nav.css'
class Nav extends React.Component {
  constructor(props) {
    super(props)
  }


  render() {
    console.log(this.props);
    let callbackParent = this.props.callbackParent;
    let tabs = this.props.menu.map((item) => {
      return <Link className={styles.navItem} onClick={() => {
        callbackParent({newIndex:item.pri,menuName:item.menuName});
      }} key={item.id}>{item.menuName}</Link>
    })
    return (
      <div className={styles.nav}>
        <div>
          {/*循环展示所有直播课程*/}
          {/*{tabs}*/}
        </div>
      </div>
    )
  }
}

const mapStateToProps = (state, ownProps) => ({
  layouts: state.layouts,
  // screenItemsUrl: state.screenItems.url,
});


export default connect(mapStateToProps)(Nav);
